import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import uView from '@/uni_modules/uview-ui'
import './permission' // permission
import DictData from '@/components/dict/init'
import DictTag from '@/components/dict/DictTag'

import {
  addDateRange
} from '@/utils/common.js'
Vue.use(plugins)
Vue.use(uView)
Vue.component('DictTag', DictTag)

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.addDateRange = addDateRange

DictData.install()

App.mpType = 'app'

const app = new Vue({
  ...App
})
// #ifdef H5
// 提交前需要注释  本地调试使用
const env = process.env.NODE_ENV
if (env == 'development') {
  const vconsole = require('vconsole')
  Vue.prototype.$vconsole = new vconsole() // 使用vconsole
}

import signalR from '@/utils/signalR'
signalR.init('/msgHub');
Vue.prototype.signalr = signalR
// #endif
app.$mount()